package com.yan.demo.arrydemo;

import java.util.Random;
import java.util.Scanner;

public class ArrayTest15 {
    public static void main(String[] args) {
        int num = new Scanner(System.in).nextInt();
        int[] arr = new int[num];
        for (int i = 0; i < arr.length; i++) {
            arr[i] = new Random().nextInt(101);
        }
        int num1 = 0 , num2 = 0;
        double sum = 0;
        for (int i = 0; i < arr.length; i++) {
            if(arr[i] < 60){
                num1++;
            } else {
                num2++;
            }
            sum += arr[i];
        }
        double avg = sum / num;
        System.out.println("不及格人数:" + num1);
        //System.out.println("及格人数:" + num2);
        System.out.println("班级平均分:" + avg);
    }
}
